/*    file: SecureDataStore.h
 *    desc:
 *   
 * created: 2017-08-01
 *  author: chuanjiang.zh@qq.com
 * company: 
 */ 


#if !defined SECUREDATASTORE_H_
#define SECUREDATASTORE_H_

#include "BasicType.h"
#include <string>
#include <vector>


class SecureDataStore
{
public:
	virtual ~SecureDataStore() {}

	virtual bool open(const std::string& filepath) = 0;

	virtual void close() = 0;

	virtual bool isOpen() = 0;

	virtual bool getValue(const std::string& key, std::string& value) = 0;

	virtual bool contains(const std::string& key) = 0;

	virtual bool setValue(const std::string& key, const std::string& value) = 0;

	virtual bool removeValue(const std::string& key) = 0;

	virtual void removeValues() = 0;

	virtual int getKeys(std::vector< std::string >& keys) = 0;

	virtual int findKeys(const std::string& pattern, std::vector< std::string >& keys) = 0;

};


#endif //SECUREDATASTORE_H_

